package framework;

import java.util.Date;

public class BaseObject implements ICallBack {
	
	private Integer id;
	private Date createdAt;
	private Date updatedAt;
	
	public Date getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	public Date getUpdatedAt() {
		return updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}
	
	public void beforeSave() {
		setUpdatedAt(new Date());
	}

	@Override
	public void afterSave() {
		
	}

	@Override
	public void afterCreate() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void beforeCreate() {
		setCreatedAt(new Date());
	}

	@Override
	public void afterDelete() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void beforeDelete() {
		// TODO Auto-generated method stub
		
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
}
